package de.pernpas.stadtfuehrer.entity;

import java.io.Serializable;

public enum Role implements Serializable {
    TOURIST,
    GUIDE,
    EDITOR,
    ADMIN;
    
    public static Role getRole(String name){
    	Role result = null;
    	
    	Role[] roles = Role.values();
    	
    	for (int i = 0; i < roles.length; i++) {
			Role role = roles[i];
			if(role.name().equals(name)){
				result = role;
				break;
			}
		}
    	return result;
    }
}
